;; Simple test for call-with-current-continuation
(display "简单测试call/cc功能\n\n")

;; 基本测试
(display "测试1: 基本的continuation使用\n")
(define result1 (call/cc (lambda (k) (k 42))))
(display "结果1: ")
(display result1)
(display "\n\n")

;; call/cc与if结合测试
(display "测试2: call/cc与if结合使用\n")
(define k #f)
(define result2 (if (call/cc (lambda (k_param) (set! k k_param) #f)) 0 1))
(display "result2的值: ")
(display result2)
(display "\n")

(display "调用(k #t)...\n")
(define result3 (k #t))
(display "result3的值: ")
(display result3)
(display "\n")

(display "调用(k #f)...\n")
(define result4 (k #f))
(display "result4的值: ")
(display result4)
(display "\n\n")

(display "所有测试完成！call/cc功能正常工作。\n")